import { createRouter, createWebHistory } from "vue-router";
const router = createRouter({
    history: createWebHistory(),
    routes: [
        {
            path: "/",
            //  路由懒加载
            component: () => import("../components/HelloWorld.vue"),
        },
    ],
});
router.beforeEach((to, from, next) => {
    // 用于设置 浏览器的 title 显示
    if (to.meta.title) {
		document.title = `${to.meta.title} `
	}  
    next()
});
export default router;
